home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / mg / docs / config < prev    next >
Text File  |  1995-03-09  |  28KB  |  671 lines

  1.  
  2.             CONFIG USERS MANUAL
  3.  
  4.  
  5.  
  6. 0. TABLE OF CONTENTS
  7.  
  8.     0.    TABLE OF CONTENTS
  9.     1.    INTRODUCTION
  10.     1.1    Description
  11.     1.2    Overview
  12.     1.3    Conventions
  13.     2.    PREPARING A CONFIGURATION
  14.     2.1    Syntax
  15.     2.2    Options Files
  16.     2.3    Configuration Files
  17.     3.    PREPARING OPTIONS FILES
  18.     3.1    Value Options
  19.     3.2    Option Options
  20.     3.3    Required Options
  21.     3.4    Action Options
  22.     3.5    Names To Avoid
  23.     4.    PROGRAMMING FOR CONFIG
  24.     4.1    Starting Out
  25.     4.2    Required Options
  26.     4.3    Option Options
  27.     4.4    Value Options
  28.     4.5    The "Appropriate" Options File
  29.     4.6    Converting a Program for Config
  30.  
  31. 1. INTRODUCTION
  32.  
  33. This section describes config, gives an overview of this manual, and
  34. introduces the user to the conventions and terminology of config.
  35.  
  36. 1.1 Description
  37.  
  38. Config is a tool that makes configuring a certain type of large
  39. program much easier for anyone not intimately familiar with the
  40. details of the program. It also makes keeping multiple different
  41. configurations of such programs easier - even though they may run on
  42. different machines, or under different operating systems.
  43.  
  44. The programs in question all use numerous symbols to control the
  45. conditional compilation of features in the program, or to control
  46. which code is compiled for what system.  These programs need to run on
  47. multiple different machines or operating systems, or run in an
  48. environment where having all the features of a program enabled entails
  49. an unacceptable performance cost, or makes running the program
  50. impossible.
  51.  
  52. The two normal approaches to this type of program both have problems.
  53. One approach is to change the compile commands to enable and disable
  54. features. The other approach is to keep a large file which defines all
  55. the features, and have all other files depend on that. The first can
  56. quickly generate unwieldy command lines. Both require recompiling the
  57. entire program after a change of one option, unless that option only
  58. effects one file, and the automatic building facility used for that
  59. program is defeated. Config provides an alternative that avoids both
  60. of these problems. 
  61.  
  62. 1.2 Overview
  63.  
  64. This config users manual has the following four sections:
  65.  
  66. Section 1 states what config is used for, describes this manual, and
  67. explains some conventions and terminology used throughout the manual.
  68. It should be read by anyone not already partly familiar with config.
  69.  
  70. Section 2 explains how, if you have a program already prepared for use
  71. with config and all the appropriate files set up, you would go about
  72. preparing a new configuration of that program. It should be read by
  73. everyone who wishes to rebuild a config-supported program.
  74.  
  75. Section 3 explains the meaning of the options files in terms of the
  76. program. It should be read by all those who are adding features to a
  77. config-supported program.
  78.  
  79. Section 4 describes what form a program must be in before it can be
  80. supported by config, and how to set up the initial configuration files
  81. for a program. It should be read by anyone who has a program they
  82. would like config to support.
  83.  
  84. 1.3 Conventions
  85.  
  86. There are several conventions associated with the use of config that
  87. are assumed to be true throughout this manual. The first is that
  88. config is being used to configure a program, referred to as "the
  89. program." The second is that all the files needed by config are in one
  90. directory, near the top of the source tree for the program. The third
  91. is that that directory is called "conf". It will hereinafter be
  92. referred to as "the conf directory", or just "conf". Config assumes
  93. that at the same level as the conf directory there will be one
  94. directory for every configuration that can currently be built. These
  95. will be called "configuration directories", or "the configuration
  96. directory". The names of these directories are usually in upper case.
  97. In the conf directory, there are two types of files which config cares
  98. about. The first are those with the extension ".options". These are
  99. "options files". The second are conventionally in upper case, and
  100. represent different configurations of the program.  For each of these,
  101. there should be a configuration directory with the same name. These
  102. are "configuration files" or "config files".  Configuration files and
  103. options files contain lines, each of which is either a comment, or
  104. describes some symbol the programmer uses to control compilation of
  105. the program. These symbols are called options.  Currently, config only
  106. supports the configuration of C programs. It could easily support
  107. others, but this document assumes the program is written in C. 
  108.  
  109.  
  110. 2. PREPARING A CONFIGURATION
  111.  
  112. This section describes the steps necessary to prepare a configuration
  113. file for use in building a configuration of a config-supported
  114. program. 
  115.  
  116. 2.1 Syntax
  117.  
  118. In the conf directory, you should find a collection of options files.
  119. These list all the options that can be used in all configurations of
  120. the program. Some options are required; some can be toggled on or off;
  121. others allow you to change values used by the compiler. The form of
  122. each line in an option file indicates which it is.
  123.  
  124. The most important rule about options files is that it's line based.
  125. The end of a line is the end of an option. The second thing to know is
  126. that a "#" character followed by a space starts a comment. Everything
  127. after that will be ignored by config, and is for the benefit of the
  128. reader. The meaning of the option is given in the comment. The third
  129. rule is that the first word on the line is the "name" for the option
  130. this line describes, and that everything from the end of the name to
  131. the start of any comment or the end of the line, ignoring any leading
  132. or trailing whitespace, is the "value" for the option this line
  133. describes. 
  134.  
  135. There are two special values for options in the options files. The
  136. first is "required". This means any config file that uses options in
  137. that options file must specify a value for that option (explained
  138. in a later section). The second special value is "option". This
  139. means that the named option is a toggle, and is normally off. It also
  140. changes the format used in the configuration file for that option.
  141. Finally, there is one special name for options: "action". You should
  142. ignore any option lines with that name. All other options allow you to
  143. specify a value for the named option, and list the default value if
  144. you don't specify one.
  145.  
  146. A required option could look like this, with comments:
  147.  
  148. system        required    # which system we're compiling it for
  149.                 # currently supported: amiga, vms, bsd
  150.  
  151. A toggle option might look like this, with comments.
  152.  
  153. no_metakey    option        # disables the use of "meta" keys as modifiers
  154.                 # instead of prefacing commands sequences with
  155.                 # an ESC character
  156.  
  157.  
  158. This option, according to the comments, says that "meta" keys are supported
  159. for all configurations unless their config file specifies
  160. "no_metakey".
  161.  
  162. A non-required value option could look like this:
  163.  
  164. metabit            0x80    # what bit in a char is the metabit
  165.  
  166. which says that metabit is normally "0x80", unless the config file
  167. changes it.
  168.  
  169. 2.2 Options Files
  170.  
  171. Now that you know the syntax for an options file, you can start
  172. reading them. The first one to read is always "config.options". It
  173. describes the options that exist in every configuration of the
  174. program. You should read through config.options, reading the comments
  175. that describe each option (if there are no such comments, you should
  176. find the author of the program or options file and insist that they be
  177. added), and considering what values you would like those options to
  178. have.
  179.  
  180. First, decide what values the required options should have. These
  181. values will be limited to a small set, and should be listed in the
  182. comments.  For example, according to the comments:
  183.  
  184. system        required    # which system we're compiling it for
  185.                 # currently supported: amiga, vms, bsd
  186.  
  187. the required option "system" can be set to amiga, vms or bsd.
  188.  
  189. After you've decided what values you want the required options to
  190. have, you should look for options files with the first part of the
  191. names being the values you've chosen. For example, if you wanted
  192. system to be "amiga", you would look for "amiga.options". This file
  193. will list more options that are available for the program if it's
  194. configured with "system" as "amiga". You should read through that file
  195. in the same way you went through config.options. If it has more
  196. required options, you should go through the files associated with
  197. those, and so on.  Should you wish to set a required option to a value
  198. for which there is no options file, you should contact the author of
  199. the options file that has that required option in it, or the author of
  200. the program. 
  201.  
  202. 2.3 Configuration Files
  203.  
  204. Having read through all the options files associated with the
  205. configuration you are working on, you can start on your configuration
  206. file. Most people build it as they go. Decide on a name for your file,
  207. and create it in the conf directory - if it isn't already in use.
  208. At the same time, create an empty configuration directory with the
  209. same name. By convention, both these names should be in upper case. 
  210.  
  211. The form of a configuration file is the same as the form of an options
  212. file: name as the first token on the line, value as everything from
  213. the name to any comment or the end of the line, followed by comments,
  214. which start with a "# " and go to the end of the line. For a
  215. configuration file, the name of an option must be an option that
  216. appeared in one of the options file, or the word "option". 
  217.  
  218. The required options must all be listed before any other options. In
  219. addition, the required option whose value names an options file must
  220. be listed before any required options from the options file it names.
  221.  
  222. So if config.options contained:
  223.  
  224. system        required    # which system we're compiling it for
  225.                 # currently supported: amiga, vms, bsd
  226.  
  227. and amiga.options contained:
  228.  
  229. compiler    required    # which C compiler is being used.
  230.                 # currently supports only lattice or manx
  231.  
  232. then your config file might start like:
  233.  
  234. system        amiga
  235. compiler    lattice
  236.  
  237. The remaining options can be listed in any order. Normal value options
  238. are listed the same way that required options are listed. Options
  239. whose value was "option" can be listed in one of two ways. The first
  240. and preferred way is with a line which specifies the name "option",
  241. and then the name of the option you wish to turn on. You can also list
  242. the name of the option as the name on the line, and give it a value of
  243. either "on" or "off", but this form may not be supported in future
  244. versions of config. Config will not complain if you vary from these
  245. forms, but the compiler might when you attempt to compile the program.
  246. The option options default to off, and "name on" is identical to
  247. "option name". So, if you encounter the following two options in
  248. various options files:
  249.  
  250. no_metakey        option    # disables the use of "meta" keys as modifiers
  251.                 # instead of prefacing commands sequences with
  252.                 # an ESC character
  253.  
  254. metabit            0x80    # what bit in a char is the metabit
  255.  
  256. then part of your config file might look like:
  257.  
  258. option        no_metakey    # My terminal doesn't support it anyway
  259. metabit        0x100        # For the international character set
  260.  
  261. which is identical to
  262.  
  263. no_metakey    on
  264. metabit    0x100
  265.  
  266. Both of these turn on the no_metakey option (thus, according to the
  267. comments, disabling support for the meta key), and change metabit from
  268. its normal value of 0x80 to 0x100.
  269.  
  270. The final step is to run config on your config file. To do that, make
  271. sure you're in the config directory, and issue the command
  272.  
  273.     config CONFIGFILE
  274.  
  275. Config will then scan all the appropriate options files and your
  276. config file and prepare your configuration directory for building the
  277. configuration you've specified.
  278.  
  279.  
  280. 3. PREPARING OPTIONS FILES
  281.  
  282. This section discusses what config does with the values given to
  283. options, and how that can change the program produced.
  284.  
  285. 3.1 Value Options
  286.  
  287. Value options are listed in the options or config files with their
  288. name, and the value that will be #defined to their name at compile
  289. time. For section 3.1, assume that the following is in an options file
  290. for the config file and program being configured:
  291.  
  292. promptwait    20    # number of 10ths of a second to wait before timing
  293.             # out while waiting for the user.
  294.  
  295. For each value option, config creates a file in the configuration
  296. directory whose name is the name of the option, with a ".h" appended.
  297. For the above example, there would be a file "promptwait.h" in the
  298. configuration directory. 
  299.  
  300. That file contains a single define (or in a special case, is empty)
  301. that defines the option name in upper case, and gives it the value
  302. specified (or in a special case, just defines it). So, for the above,
  303. if the config file doesn't change promptwait, the file promptwait.h in
  304. the configuration directory would contain
  305.  
  306. #define PROMPTWAIT    20
  307.  
  308. If the config file did change promptwait, for example, reducing it to 10:
  309.  
  310. promptwait    10
  311.  
  312. then config would build promptwait.h to indicate that change:
  313.  
  314. #define    PROMPTWAIT    10
  315.  
  316. 3.2 Option Options
  317.  
  318. Option options are listed in the options files with their name, and
  319. the value "option". They have no value #defined to their names at
  320. compile time - they are either defined or not. For section 3.2, assume
  321. that the following is in an options file for the configuration being
  322. configured:
  323.  
  324. v11        option    # must be defined for the editor to either run on
  325.             # or compile on a version 1.1 AmigaDOS system.
  326.             # It mainly wards against bugs in the 1.1 ROM Kernel.
  327.  
  328. Config will create a file whose name is the name of the option, with
  329. ".h" appended. So the above option will cause "v11.h" to be created in
  330. the configuration directory. If the option is left off, the file is
  331. left empty. If the option is turned on, the file will define the
  332. option name - once again, in upper case - as a symbol.
  333.  
  334. So if the v11 option is left off, then the file v11.h will contain
  335. nothing. If some config file turns v11 on, then v11.h will contain
  336.  
  337. #define    V11
  338.  
  339. As an implementation detail, if any value option has the value
  340. of "on" or "off", it will be treated as if it were an option option,
  341. and either not defined, or just defined with no value attached to the
  342. symbol. This is useful in that it allows for #define symbols whose
  343. existence causes code to appear, and whose value is needed by the code
  344. if it appears.
  345.  
  346. 3.3 Required Options
  347.  
  348. Required options are listed in the options file with the special value
  349. of "required". They will be given a value in every config file that
  350. uses that options file, and will cause config to check the options
  351. file named by the value given them in the config file.
  352.  
  353. Like the other kinds of options, required options cause a file whose
  354. name is their name with a ".h" appended to be created in the
  355. configuration directory. Unlike the others, the name of the option is
  356. not what is defined. Instead, the value of the option is defined as a
  357. symbol, once again in upper case. The symbol is not defined to be any
  358. specific value.
  359.  
  360. For instance, if the options file contained
  361.  
  362. compiler    required # which C compiler is being used.
  363.              # currently supports only lattice or manx
  364.  
  365. Then config will create "compiler.h" in the configuration directory.
  366. If the config file contained this as:
  367.  
  368. compiler    lattice
  369.  
  370. then the contents of compiler.h would be
  371.  
  372. #define    LATTICE
  373.  
  374. In addition, the file "lattice.options" will be scanned for further
  375. options when the compiler option is specified in the config file.
  376. If the config file had instead specified "compiler manx", then MANX
  377. would be #defined in compiler.h, and "manx.options" would be scanned.
  378.  
  379. 3.4 Action Options
  380.  
  381. Action options are specified in options files with a name of "action".
  382. They are never mentioned in config files, and have no direct effect on
  383. the compilation of the program.
  384.  
  385. What action options do is list commands to be issued to the command
  386. processor after the include files specified by the other options have
  387. been created. The commands are issued in the order they were found in
  388. the options file, and have the configuration directory as their
  389. current working directory when they are issued.
  390.  
  391. Normally, action commands are used to take care of any preparations
  392. needed before the program can be compiled in the configuration
  393. directory. Examples are copying makefiles into the directory, building
  394. dependency files, or just issuing comments to the user. A typical
  395. short example is:
  396.  
  397. action        lc:lmk -f /amiga/lmkfile depend
  398. action        echo "Ready to lmk this configuration of mg."
  399.  
  400. This issues the command "lc:lmk" with the three arguments "-f",
  401. "/amiga/lmkfile" and "depend" (which, in this cases, creates a new
  402. makefile in the current directory with a dependency list appended to
  403. it), and the command "echo" with the argument '"Ready to lmk this
  404. configuration of mg."' (which, in this case, tells the user that the
  405. configuration directory is ready for the lmk command which will make
  406. the program in it).
  407.  
  408. 3.5 Names To Avoid
  409.  
  410. There are some names that you can not use when creating options,
  411. mostly became they clash with words that config uses to change the
  412. treatment of that option. Most of these words are external: option,
  413. required, off, on. The following table lists all such words, and
  414. describes where they cannot be used or where they should be used with
  415. care. 
  416.  
  417.     word        not valid
  418.  
  419.     action        as an option name
  420.     option        as an option name, or the default value for an option
  421.     required    as the default value for an option
  422.     on        as an option value
  423.     off        as an option value
  424.  
  425. 'On' and 'off' are special cases, and can be useful as option values if
  426. used with care. Their use is described above.
  427.  
  428. In addition, any option name must be valid as the name (without
  429. extension) for a header file on your system. Likewise, any required
  430. option value must be valid as the name for an options file. Finally,
  431. option names and required option values must be valid preprocessor
  432. symbols.
  433.  
  434.  
  435. 4. PROGRAMMING FOR CONFIG
  436.  
  437. This section discusses what form a program must be in so that it can
  438. be configured with config.
  439.  
  440. 4.1 Starting Out
  441.  
  442. Once you've decided that a program will be configured by config, it is
  443. straightforward - but some work - to insure that config can be used to
  444. best advantage. This is best done while the program is still in the
  445. design phase. Converting existing programs for configuration via
  446. config is possible, but painful. See section 4.6 for information on
  447. converting existing programs. 
  448.  
  449. Every time you use a new #defined symbol, you must decide which of
  450. four classes it belongs to: 
  451.  
  452.     1) The symbol in some way distinguishes one version from another.
  453.  
  454.     2) The symbol causes features to appear or disappear from some or all
  455.        versions. 
  456.  
  457.     3) The symbol is a compile-time value that affects some or all
  458.        versions.
  459.  
  460.     4) The symbol depends on the values of other symbols in a
  461.        predetermined way. 
  462.  
  463. The four cases all require slightly different treatment, and all but
  464. the fourth will be discussed in separate sections.  in the fourth
  465. case, the symbol should be dealt with in source code, and no option of
  466. any kind need appear for it in the options files. 
  467.  
  468. 4.2 Required Options
  469.  
  470. Symbols that distinguish versions from one another are almost
  471. certainly "required" options. They usually come in sets of #defined
  472. symbols that are mutually contradictory - if one is on, all the others
  473. must be off. Each such set is represented by one required option,
  474. where the possible values of that required option are the different
  475. symbols that can be defined. 
  476.  
  477. When such a symbol is first referenced, you should determine if it
  478. belongs to such a set that already exists. If so, then change the
  479. comment for the required option for that set to reflect the new
  480. possible value, and then create an empty options file with that value as
  481. the first part of its name, containing a comment describing what it
  482. is. 
  483.  
  484. For example, suppose you add a new symbols "sysv" that is appropriate for
  485. the following option:
  486.  
  487. system        required    # which system we're compiling it for
  488.                 # currently supported: amiga, vms, bsd
  489.  
  490. Then add ", sysv" to the end of the second comment, and create an
  491. options file "sysv.options", with comment:
  492.  
  493. #
  494. # support for System V. No options to choose from (yet).
  495. #
  496.  
  497. Any code that needed to be compiled in - or needed to not be compiled
  498. in - for the System V version of the program would then have it's
  499. conditional compilation depend on the symbol SYSV.
  500.  
  501. Normally, required options are added to a program after it has been
  502. working in some incarnation for a while - for instance, when it is
  503. being ported to a new machine or operating system. In those cases, if
  504. we are adding a value to a required type, you must find all files that
  505. include the .H file which config creates for that option and check to
  506. see what should be added.
  507.  
  508. In cases where the required option did not exist before, you need to
  509. choose a name for the option, and add that as a required option in the
  510. appropriate options file with a comment indicating what values it can
  511. take on. You should also create the options files for each of those
  512. values, as above. Finally, every source file that checks for one of
  513. the possible values of the option being defined must be changed to
  514. include the .h file with the name you chose for the required option.
  515. Any automated compilation facilities should be informed of the change
  516. in whatever way is needed. 
  517.  
  518. For example, suppose you are adding support for a second terminal type
  519. to a program - for example, adding termio to a program that already
  520. has termcap support. The option name "tty" or "term" suggests itself,
  521. with the possible values of "termcap" and "termio". So you would add
  522. the following to the appropriate options file:
  523.  
  524. term    required        # type of terminal support used. One of:
  525.                 # termcap, termio
  526.  
  527. You should also create the files "termcap.options" and
  528. "termio.options", with comments describing what they are. Code should
  529. then appear in the source files conditionally compiled on the symbols
  530. "TERMCAP" and "TERMIO". Any source file that depends on those symbols
  531. should be changed to include the file "term.h".
  532.  
  533. 4.3 Option Options
  534.  
  535. Any symbols that cause code to be conditionally compiled in, but can
  536. be left on or off without requiring that any other symbols be on or
  537. off (unless they require code that those other symbols control the
  538. compilation of, or something similar) should become "option" options.
  539.  
  540. When such a symbol is first referenced, all you need to do is add the
  541. name of the symbol and a comment describing it to the appropriate
  542. options file. For example, if you were adding mouse support to a
  543. program, but wanted to allow people to build the program on systems
  544. that didn't have mice attached, you would probably conditionally
  545. compile in that extra code if the symbol "MOUSE" were defined. So you
  546. would add:
  547.  
  548. mouse        option    # provide mouse support
  549.  
  550. Every source file that had code that depended on MOUSE should also
  551. include "mouse.h", as that is where config will put the #define for
  552. MOUSE.
  553.  
  554. 4.4 Value Options
  555.  
  556. If a defined symbol has a value that is used in the code, then you are
  557. dealing with a "value" option. It is treated the same as an "option"
  558. option, except that the preprocessor symbol will have a value, instead
  559. of merely being defined or not defined.
  560.  
  561. When such a symbol is first referenced, follow the same actions as the
  562. "option" options, except you must choose a default value for the
  563. option and use that for the value in the options file instead of the
  564. word "option". 
  565.  
  566. For example, if the program had a limit for number of screen lines
  567. built into it, and you wished to make that limit available to the
  568. person compiling the program so they could raise or lower it as
  569. appropriate for their environment. Decide on a reasonable default -
  570. say 70 - and add the following line to the appropriate options file:
  571.  
  572. maxlines    70    # maximum number of display lines we can work with
  573.  
  574. You should then change all source files that depend on this maximum to
  575. use the symbol MAXLINES, and have them include "maxlines.h" to get the
  576. value.
  577.  
  578. You can have a value option do double duty, if you so desire. If one
  579. of the values the option can take on is "off", then the symbol will
  580. not be defined. This allows you to have code that doesn't appear
  581. if the user doesn't want it, and a symbol that holds a needed value in
  582. that code. For example, if word-wrap code were part of a program, and
  583. you wanted it to be either on by default, off by default, or disabled
  584. completely, you might have entries in an option file like so:
  585.  
  586. wrap        1    # word wrap code. Three values are supported:
  587.             # off -> code isn't there at all
  588.             # 0   -> code is there, but turned off at startup
  589.             # 1   -> code is there, and on at startup.
  590.  
  591. and C code that looks like:
  592.  
  593. #ifdef    WRAP
  594. int wrap_mode = WRAP ;
  595. #endif
  596.  
  597. with appropriate code to handle the word wrap.
  598.  
  599. 4.5 The "Appropriate" Options File
  600.  
  601. The previous three sections each mentioned "the appropriate options
  602. file." This sections discusses how you would find that file.
  603.  
  604. The matter is actually very simple. The options files for a program
  605. can be viewed as a tree, with "config.options" at the root, and
  606. branches from each options file for the required options in that file.
  607. The various different versions of the program then correspond to the
  608. leaves of this tree. The "appropriate" options file for an option to
  609. be added to would be the options file farthest from the root which
  610. contained all the versions for which that option could apply.
  611.  
  612. Required options separate versions from one another, and would seem to
  613. require more work. This is seldom the case. Usually, when required
  614. options are first added, there are no options in their options file,
  615. so using the same method as described above will work.
  616.  
  617. In practice, there usually isn't any problem. When an option is added,
  618. there is a clear idea of what versions it will and won't be
  619. appropriate to add to, and the "appropriate" options file will be
  620. obvious.
  621.  
  622. 4.6 Converting a Program for Config
  623.  
  624. Converting an existing program for use with config is easy to
  625. describe, and for simple programs, is easy to do. However, if you're
  626. considering converting a program for use with config, it's probably
  627. because the compile-time options have gotten out of hand, so you face
  628. a rather large job.
  629.  
  630. There are only four steps to convert a program to config: 1) find all
  631. the defined symbols; 2) classify them as described in section 4.1; 3)
  632. create the config.options and all options files needed for required
  633. options; 4) modify the source as appropriate. We will look at each
  634. step in some depth.
  635.  
  636. Finding all the defined symbols is easy if you have a tool for
  637. selecting lines by pattern from a file. Find all lines that start
  638. with #define or #if in all source files. Delete the preprocessor
  639. directives and any extraneous information, and then sort the results.
  640. At this point, you should have all symbols which are candidates for
  641. options in hand.
  642.  
  643. Classifying symbols is slightly harder. The previous sections
  644. discusses the various types of symbols and their characteristics.
  645. Start by finding all the symbols which are values for required
  646. options. At this point, you can create a first version of
  647. config.options with the required options and their possible values
  648. listed. You can also create the other options files, with comments
  649. describing what version(s) of the program they provide options for. 
  650.  
  651. The second step should be to identify those symbols which aren't going
  652. to be visible as options to the users. These will have values that can
  653. be determined from the other symbols. You should start adding code (if
  654. it doesn't exist) to define these symbols, based on the values of the
  655. other symbols.
  656.  
  657. Next, go through the remaining symbols and decide if they are "option"
  658. options or "value" options, and treat them as described in the
  659. preceding sections. By the time you have completed this step, you
  660. should have all the options files finished.
  661.  
  662. Then go through the source files and add the appropriate #include's
  663. for all defined symbols used in each file, if those symbols are now in
  664. files created by config. Finally, delete the definition of those same
  665. symbols from wherever they were defined previously - either in build
  666. scripts, make files, or .h files.
  667.  
  668. If you are using automated compilation tools, you should also modify
  669. the data files for those so that the new dependencies are reflected in
  670. them.
  671.